<template>
  <el-card style="margin-bottom:20px;">
    <div slot="header" class="clearfix">
      <span>个人信息</span>
    </div>

    <div class="user-profile">
      <div class="user-name text-left">{{ user_info.fullName }}</div>
    </div>

    <div class="user-bio">
      <el-row>
        <el-col :span="8">
          <div class="user-education user-bio-section">
            <div class="user-bio-section-header"><svg-icon icon-class="example" /><span>基本信息</span></div>
            <div class="user-bio-section-body">
              <div class="text-muted">
                <div class="item-one"><span class="title-text">性别：</span><span class="content-text">{{ user_info.gender }}</span></div>
                <div class="item-one"><span class="title-text">年龄：</span><span class="content-text">{{ user_info.age }}</span></div>
                <div class="item-one"><span class="title-text">民族：</span><span class="content-text">{{ user_info.ethnicity }}</span></div>
                <div class="item-one"><span class="title-text">电话：</span><span class="content-text">{{ user_info.phone }}</span></div>
                <div class="item-one"><span class="title-text">政治面貌：</span><span class="content-text">{{ user_info.politicalOutlook }}</span></div>
                <div class="item-one"><span class="title-text">出生日期：</span><span class="content-text">{{ user_info.birthDate }}</span></div>
                <div class="item-one"><span class="title-text">身份证：</span><span class="content-text">{{ user_info.iDCard }}</span></div>
                <div class="item-one"><span class="title-text">出生地点：</span><span class="content-text">{{ user_info.birthPlace }}</span></div>
                <div class="item-one"><span class="title-text">籍贯：</span><span class="content-text">{{ user_info.nativePlace }}</span></div>
                <div class="item-one"><span class="title-text">家庭住址：</span><span class="content-text">{{ user_info.homeAddress }}</span></div>
                <div class="item-one"><span class="title-text">所属社区：</span><span class="content-text">{{ user_info.communityGroup }}</span></div>
                <div class="item-one"><span class="title-text">户口所在地：</span><span class="content-text">{{ user_info.registeredResidence }}</span></div>
              </div>
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="user-education user-bio-section">
            <div class="user-bio-section-header"><svg-icon icon-class="skill" /><span>工作信息</span></div>
            <div class="user-bio-section-body">
              <div class="text-muted">
                <div class="item-one"><span class="title-text">学科：</span><span class="content-text">{{ user_info.disciplines }}</span></div>
                <div class="item-one"><span class="title-text">年级组：</span><span class="content-text">{{ user_info.gradeGroup }}</span></div>
                <div class="item-one"><span class="title-text">职务：</span><span class="content-text">{{ user_info.post }}</span></div>
                <div class="item-one"><span class="title-text">编制类型：</span><span class="content-text">{{ user_info.establishmentType }}</span></div>
                <div class="item-one"><span class="title-text">开始工作时间：</span><span class="content-text">{{ user_info.starWorkDate }}</span></div>
                <div class="item-one"><span class="title-text">教师资格：</span><span class="content-text">{{ user_info.teacherQualification }}</span></div>
                <div class="item-one"><span class="title-text">获得时间：</span><span class="content-text">{{ user_info.teacherQualificationTime }}</span></div>
                <div class="item-one"><span class="title-text">职称：</span><span class="content-text">{{ user_info.title }}</span></div>
                <div class="item-one"><span class="title-text">职级：</span><span class="content-text">{{ user_info.titleLevel }}</span></div>
                <div class="item-one"><span class="title-text">岗位类型：</span><span class="content-text">{{ user_info.jobClassification }}</span></div>
              </div>
            </div>
          </div>
        </el-col>
        <el-col :span="8">
          <div class="user-education user-bio-section">
            <div class="user-bio-section-header"><svg-icon icon-class="education" /><span>学历信息</span></div>
            <div class="user-bio-section-body">
              <div class="text-muted">
                <div class="item-one"><span class="title-text">普通话等级：</span><span class="content-text">{{ user_info.putonghuaLevel }}</span></div>
                <div class="item-one"><span class="title-text">获得时间：</span><span class="content-text">{{ user_info.putonghuaLevelTime }}</span></div>
                <div class="item-one"><span class="title-text">第一学历：</span><span class="content-text">{{ user_info.firstDegree }}</span></div>
                <div class="item-one"><span class="title-text">第一毕业院校</span><span class="content-text">{{ user_info.firstGraduateSchool }}</span></div>
                <div class="item-one"><span class="title-text">第一学历主修：</span><span class="content-text">{{ user_info.firstMajor }}</span></div>
                <div class="item-one"><span class="title-text">最高学位：</span><span class="content-text">{{ user_info.highestDegree }}</span></div>
                <div class="item-one"><span class="title-text">最高学位学校：</span><span class="content-text">{{ user_info.highestGraduateSchool }}</span></div>
                <div class="item-one"><span class="title-text">最高学历主修：</span><span class="content-text">{{ user_info.highestMajor }}</span></div>
                <div class="item-one"><span class="title-text">mhk等级：</span><span class="content-text">{{ user_info.mhkLevel }}</span></div>
                <div class="item-one"><span class="title-text">获取时间：</span><span class="content-text">{{ user_info.mhkLevelTime }}</span></div>
              </div>
            </div>
          </div>
        </el-col>
      </el-row>

      <div class="user-skills user-bio-section">
        <div class="user-bio-section-header"><svg-icon icon-class="documentation" /><span>备注</span></div>
        <div class="user-bio-section-body">
          <div class="progress-item">
            <span>{{ user_info.commitWord }}</span>
          </div>
        </div>
      </div>
    </div>
  </el-card>
</template>

<script>
import PanThumb from '@/components/PanThumb'
import {selectMessage} from "@/api/personalMenu";

export default {
  components: { PanThumb },
  data() {
    return {
      user_info: {}
    }
  },
  created() {
    this.getUserInfo();
  },
  methods: {
    getUserInfo() {
        selectMessage().then((res) => {
            if (res.code != "200") {
                this.$message({
                    message: res.data.msg,
                    type: 'warning'
                });
            }else{
                this.user_info = res.data;
                console.log(res.data);
            }
        }).catch(() => {

        })
    }
  }
}
</script>

<style lang="scss" scoped>
.item-one {
  margin-bottom: 7px;
}
.title-text {
  color: #909399;
  font-size: 14px;
}
.content-text {
  color: #606266;
  font-size: 14px;
}
.box-center {
  margin: 0 auto;
  display: table;
}

.text-muted {
  color: #777;
}

.user-profile {
  .user-name {
    font-weight: bold;
  }

  .box-center {
    padding-top: 10px;
  }

  .user-role {
    padding-top: 10px;
    font-weight: 400;
    font-size: 14px;
  }

  .box-social {
    padding-top: 30px;

    .el-table {
      border-top: 1px solid #dfe6ec;
    }
  }

  .user-follow {
    padding-top: 20px;
  }
}

.user-bio {
  margin-top: 20px;
  color: #606266;

  span {
    padding-left: 4px;
  }

  .user-bio-section {
    font-size: 14px;
    padding: 15px 0;

    .user-bio-section-header {
      border-bottom: 1px solid #dfe6ec;
      padding-bottom: 10px;
      margin-bottom: 10px;
      font-weight: bold;
    }
  }
}
</style>
